<template>
  <mci-label class="py-5"> 结果预览 </mci-label>
  <div class="max-h-500 mt-8" style="width: 100%; overflow: auto">
    <MciTable :list="tableColumn" :data="tableData" />
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import { MciTable, MciLabel } from '@/components/base';
import { ITableColumn } from '@/components/base/Table';

const props = defineProps<{
  tableData: any;
  tableColumn: any;
}>();

watch(
  () => [props.tableData, props.tableColumn],
  () => {
    tableData.value = props.tableData || [];
    tableColumn.value = props.tableColumn || [];
  },
  { deep: true }
);

const tableData = ref<any[]>([]);
const tableColumn = ref<ITableColumn[]>([]);

tableData.value = props.tableData || [];
tableData.value = props.tableData || [];
</script>
